package com.wumao.mapper;

import com.wumao.pojo.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author Gaowumao
 * @Decripted
 * @Email none-j@qq.com
 * @create 2021-04-15 20:11
 */
public interface TypeMapper extends JpaRepository<Type,Long> {

    Type queryByName(String name);


    @Query("select t from Type t")
    List<Type> findTop(Pageable pageable);

}
